Add concept of "staged" deployment
authorColin Walters <walters@verbum.org>
Thu, 22 Feb 2018 20:27:59 +0000 (15:27 -0500)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 12 Apr 2018 14:55:12 +0000 (14:55 +0000)
commiteb506c759c666af2461f1ba3dda4e31ea49ebc41
treeec78dcc19982e3b14545ad2b22902a85c9a7e4ef
parentff50495f67a95c9b2fef5f9b84bc91469a46eb27
Add concept of "staged" deployment

Add API to write a deployment state to `/run/ostree/staged-deployment`,
along with a systemd service which runs at shutdown time.

This is a big change to the ostree model for hosts,
but it closes a longstanding set of bugs; many, many people have
hit the "losing changes in /etc" problem.  It also avoids
the other problem of racing with programs that modify `/etc`
such as LVM backups:
https://bugzilla.redhat.com/show_bug.cgi?id=1365297

We need this in particular to go to a full-on model for
automatically updated host systems where (like a dual-partition model)
everything is fully prepared and the reboot can be taken
asynchronously.

Closes: https://github.com/ostreedev/ostree/issues/545
Closes: #1503
Approved by: jlebon
23 files changed:
Makefile-boot.am
Makefile-ostree.am
apidoc/ostree-sections.txt
src/boot/ostree-finalize-staged.service [new file with mode: 0644]
src/libostree/libostree-devel.sym
src/libostree/ostree-cmdprivate.c
src/libostree/ostree-cmdprivate.h
src/libostree/ostree-deployment-private.h
src/libostree/ostree-deployment.c
src/libostree/ostree-deployment.h
src/libostree/ostree-sysroot-cleanup.c
src/libostree/ostree-sysroot-deploy.c
src/libostree/ostree-sysroot-private.h
src/libostree/ostree-sysroot.c
src/libostree/ostree-sysroot.h
src/ostree/ot-admin-builtin-deploy.c
src/ostree/ot-admin-builtin-finalize-staged.c [new file with mode: 0644]
src/ostree/ot-admin-builtin-status.c
src/ostree/ot-admin-builtins.h
src/ostree/ot-builtin-admin.c
tests/installed/destructive.yml
tests/installed/destructive/staged-deploy.yml [new file with mode: 0644]
tests/installed/tasks/reboot.yml [new file with mode: 0644]